<div class="card">
    <div class="card-body">
        <a class="btn btn-success w-100" href="{{route('topics.create')}}">
            <i class="fa fa-solid fa-edit"></i>&nbsp;新建帖子
        </a>
    </div>
</div>

@if(count($active_users))
    <div class="card mt-4">
        <div class="card-body">
            <div class="text-center text-muted">活跃用户</div>
            <hr />
            <ul class="list-group">
                @foreach($active_users as $user)
                <li class="list-group-item border-0">
                    <a href="{{route('users.show',$user->id)}}" class="mr-2 text-decoration-none">
                        <img class="img-thumbnail" width="54" src="{{$user->avatar}}" alt="{{$user->name}}">
                    </a>
                    <a href="{{route('users.show',$user->id)}}" class="text-success text-decoration-none">{{$user->name}}</a>
                </li>
                @endforeach
            </ul>
        </div>
    </div>
@endif

@if(count($links))
    <div class="card mt-4">
        <div class="card-body">
            <div class="text-center text-muted">推荐资源</div>
            <hr />
            <ul class="list-group">
                @foreach($links as $link)
                    <li class="list-group-item border-0">
                       <a href="{{$link->link}}" class="text-success text-decoration-none">{{$link->title}}</a>
                    </li>
                @endforeach
            </ul>
        </div>
    </div>
@endif
